{% extends 'car_system/base.html' %}

{% block title %}删除确认 - 汽车数据分析系统{% endblock %}

{% block content %}
<div class="card border-danger">
    <div class="card-header bg-danger text-white">
        <h5 class="mb-0"><i class="fas fa-exclamation-triangle me-2"></i>确认删除</h5>
    </div>
    <div class="card-body">
        <h4 class="mb-4">您确定要删除以下车型吗？</h4>
        
        <div class="row mb-4">
            <div class="col-md-3">
                {% if car.image %}
                <img src="{{ car.image }}" alt="{{ car.series_name }}" class="img-fluid rounded">
                {% else %}
                <div class="bg-secondary text-white rounded d-flex align-items-center justify-content-center" style="height: 150px;">
                    <h5>无图片</h5>
                </div>
                {% endif %}
            </div>
            <div class="col-md-9">
                <h5 class="text-danger">{{ car.series_name }}</h5>
                <div class="table-responsive">
                    <table class="table table-borderless">
                        <tbody>
                            <tr>
                                <th style="width: 150px;">车系ID:</th>
                                <td>{{ car.series_id }}</td>
                            </tr>
                            <tr>
                                <th>品牌:</th>
                                <td>{{ car.brand_name }}</td>
                            </tr>
                            <tr>
                                <th>价格区间:</th>
                                <td>{{ car.price }}</td>
                            </tr>
                            <tr>
                                <th>当前排名:</th>
                                <td>{{ car.ranks }}</td>
                            </tr>
                            <tr>
                                <th>月销量:</th>
                                <td>{{ car.count }}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        
        <div class="alert alert-warning">
            <i class="fas fa-exclamation-circle me-2"></i>
            <strong>警告:</strong> 删除操作不可恢复，请确认后再操作！
        </div>
        
        <form method="POST">
            {% csrf_token %}
            <div class="d-flex justify-content-between">
                <a href="{% url 'car_detail' car.series_id %}" class="btn btn-outline-secondary">
                    <i class="fas fa-arrow-left me-1"></i> 返回
                </a>
                <button type="submit" class="btn btn-danger">
                    <i class="fas fa-trash me-1"></i> 确认删除
                </button>
            </div>
        </form>
    </div>
</div>
{% endblock %} 